Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trunner: armv7a9: provide soft restarts #305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maska989
Copy link
Contributor

@maska989 maska989 commented Dec 5, 2023

JIRA: CI-389

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: armv7a9-zynq7000-evk.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

Copy link

github-actions bot commented Dec 5, 2023

Unit Test Results

7 688 tests   - 37   6 943 ✅  - 67   35m 38s ⏱️ - 1m 26s
  445 suites ± 0     714 💤  -  1 
    1 files   ± 0      31 ❌ +31 

For more details on these failures, see this check.

Results for commit 10833a0. ± Comparison against base commit aba8104.

This pull request removes 45 and adds 8 tests. Note that renamed tests count towards both.
phoenix-rtos-tests/mem/mprotect ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/mem/mprotect.test_mprotect.test_mprotect_singlecore
phoenix-rtos-tests/proc/test_thread_rand ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/proc/test_thread_rand.threads_rand.test_1
phoenix-rtos-tests/sample/test/unity ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/sample/test/unity.unity_example.example_1
phoenix-rtos-tests/sample/test/unity ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/sample/test/unity.unity_example.example_2
phoenix-rtos-tests/sample/test/unity ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/sample/test/unity.unity_example.example_3
phoenix-rtos-tests/sample/test/unity ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/sample/test/unity.unity_example.example_4
phoenix-rtos-tests/setjmp/unit ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/setjmp/unit.test_setjmp._setjmp
phoenix-rtos-tests/setjmp/unit ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/setjmp/unit.test_setjmp._setjmp_out_of_frame
phoenix-rtos-tests/setjmp/unit ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/setjmp/unit.test_setjmp.setjmp
phoenix-rtos-tests/setjmp/unit ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/setjmp/unit.test_setjmp.setjmp_out_of_frame
…
phoenix-rtos-tests/mem/mprotect ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/mem/mprotect
phoenix-rtos-tests/proc/test_thread_rand ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/proc/test_thread_rand
phoenix-rtos-tests/sample/test/unity ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/sample/test/unity
phoenix-rtos-tests/setjmp/unit ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/setjmp/unit
phoenix-rtos-tests/sys/cond ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/sys/cond
phoenix-rtos-tests/sys/mutex ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/sys/mutex
phoenix-rtos-tests/thread-local/unit ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/thread-local/unit
phoenix-rtos-tests/waitpid/unit ‑ armv7a9-zynq7000-zedboard:phoenix-rtos-tests/waitpid/unit

♻️ This comment has been updated with latest results.

@maska989 maska989 force-pushed the maska989/armv7a9_soft_restarts branch 4 times, most recently from e9f10fb to f184945 Compare December 5, 2023 13:18
@maska989 maska989 marked this pull request as ready for review December 5, 2023 15:09
@@ -109,6 +109,9 @@ def __call__(self, flash=False, hard=False):

self._set_flash_mode(flash)

# Ensuring that first up target will change state before restart
time.sleep(0.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand it's only needed on zynq target, so why do we add it in the common code?

Copy link
Contributor Author

@maska989 maska989 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On other targets are no impact about that, because construction and way how they change states are different from zynq 7000. On other targets we can easily first up reboot and in this time change state. Zynq7000 need to have to change state as first because it prepares target for what is needed after reboot. I added this code there because it doesn't colidate with other targets and clarify situation with order in flashing state.

This is Reset cycle of zynq7000-zedboard:
image

And there is reason why Reboot is needed and what types of Signals can be needed in this situation:
image
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested for a while 0.05s - I've run about 100 restarts and it seemed to work stable - to verify whether it's not possible to make it a bit shorter.

Comment on lines 30 to +35
def _reboot_soft(self):
self._reboot_hard()
self.host.set_reset(0)
time.sleep(0.5)
self.dut.clear_buffer()
self.host.set_reset(1)
time.sleep(0.25)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already defined in the same form in the parent class, so you can just remove it just like it's done there: https://github.com/phoenix-rtos/phoenix-rtos-tests/blob/8c6d062c2fbd327e2664ec371fcf8bddf1135483/trunner/target/armv7m7.py#L21C14-L21C14

Copy link
Contributor Author

@maska989 maska989 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damianloew look closely on line 32. Same history like before. It needs more time to bring down the target.

@damianloew damianloew force-pushed the maska989/armv7a9_soft_restarts branch from f184945 to 10833a0 Compare October 10, 2024 09:22
Copy link
Contributor

@damianloew damianloew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to not work now:/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants